package way.learning.zz.event;


import way.learning.zz.DirectoryPoller;
import way.learning.zz.source.PolledDirectory;

import java.io.IOException;

/**
 * An way.learning.zz.event that represents the occurrence of an I/O error in the  PolledDirectory.
 *
 */
public final class IoErrorRaisedEvent extends EventExposingPolledDirectory {

    private final IOException ioException;

    public IoErrorRaisedEvent(DirectoryPoller dp, PolledDirectory directory, IOException e) {
        super(dp, directory);
        ioException = e;
    }

    /**
     * @return the {@link IOException} that caused this way.learning.zz.event.
     */
    public IOException getIoException() {
        return ioException;
    }

}
